@echo off
REM Batch file for compiling Snake Game on Windows
REM Usage: compile.bat

echo Compiling Snake Game for Windows...

REM Check if g++ is available
where g++ >nul 2>&1
if errorlevel 1 (
    echo Error: g++ compiler not found!
    echo Please install MinGW-w64 or another C++ compiler for Windows
    pause
    exit /b 1
)

REM Compile the game
g++ -std=c++11 main.cpp snake.cpp -o snake_game.exe

if %errorlevel% equ 0 (
    echo Compilation successful!
    echo Executable: snake_game.exe
    echo.
    echo Starting Snake Game...
    snake_game.exe
) else (
    echo Compilation failed!
    pause
    exit /b 1
)